import { createRouter, createWebHashHistory } from 'vue-router'
import ManageView from '@/views/ManageView'
import LoginView from '@/views/LoginView'
import MainBoard from '@/components/MainBoard'
import AudioBoard from '@/components/AudioBoard'
import DocumentBoard from '@/components/DocumentBoard'
import ImageBoard from '@/components/ImageBoard'
// import AnnouncementBoard from '@/components/AnnouncementBoard'
import OtherBoard from '@/components/OtherBoard'

const routes = [
  {
    path: '/',
    name: 'login',
    component: LoginView
  },
  {
    path: '/manage',
    name: 'manage',
    component: ManageView,
    children: [
      {
        path: '/mainboard',
        name: 'mainboard',
        component: MainBoard
      },
      {
        path: '/audioboard',
        name: 'audioboard',
        component: AudioBoard
      },
      {
        path: '/documentboard',
        name: 'documentboard',
        component: DocumentBoard
      },
      {
        path: '/imageboard',
        name: 'imageboard',
        component: ImageBoard
      },
      {
        path: '/otherboard',
        name: 'otherboard',
        component: OtherBoard
      },
      // {
      //   path: '/announcementboard',
      //   name: 'announcementboard',
      //   component: AnnouncementBoard
      // }
    ]
  },

]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
